import { Route, useHistory } from "react-router-dom";
import Home from "../views/home";

export default ()=> {
    const history = useHistory()
    const handleGoTo = () => {
        history.push('/home')
    }

    return (
        <div>
            <button onClick={handleGoTo}>跳转</button>
            <Route path='/home' component={Home} />
        </div>  );
}
